package com.sfjswl.fp.core.result;

import com.sfjswl.fp.core.context.RuleRoam;
import com.sfjswl.fp.core.leaf.roam.BaseLeafRoamResult;
import lombok.Data;
import lombok.EqualsAndHashCode;


@Data
@EqualsAndHashCode(callSuper = true)
public class PointResult extends BaseLeafRoamResult {

    private String key;

    private double value;

    @Override
    protected boolean doRoamResult(RuleRoam roam) {
        Integer uid = roam.getValue(key);
        if (uid == null || value <= 0) {
            return false;
        }
        roam.put("SEND_POINT", true);
        return true;
    }
}
